/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmRiskassessment extends BasicModel<PmRiskassessment> {
  projectcode?: string; // 项目编号
  projectname?: string; // 项目名称
  createtime?: string; // 创建时间
  ispass?: number; // 通过情况
  constructionunit?: string; // 审批人
  name?: string; // name
  evaluationtime?: string; // evaluationtime
  evaluationresult?: string; // evaluationresult
  isdelay?: number; // isdelay
  delaytime?: string; // delaytime
  delayfile?: string; // delayfile
  delayfileupdatetime?: string; // delayfileupdatetime
  ispaper?: number; // ispaper
}

export const pmRiskassessmentList = (params?: PmRiskassessment | any) =>
  defHttp.get<PmRiskassessment>({ url: adminPath + '/proj/safe/pmRiskassessment/list', params });

export const pmRiskassessmentListData = (params?: PmRiskassessment | any) =>
  defHttp.post<Page<PmRiskassessment>>({
    url: adminPath + '/proj/safe/pmRiskassessment/listData',
    params,
  });

export const pmRiskassessmentForm = (params?: PmRiskassessment | any) =>
  defHttp.get<PmRiskassessment>({ url: adminPath + '/proj/safe/pmRiskassessment/form', params });

export const pmRiskassessmentSave = (params?: any, data?: PmRiskassessment | any) =>
  defHttp.postJson<PmRiskassessment>({
    url: adminPath + '/proj/safe/pmRiskassessment/save',
    params,
    data,
  });

export const pmRiskassessmentDelete = (params?: PmRiskassessment | any) =>
  defHttp.get<PmRiskassessment>({ url: adminPath + '/proj/safe/pmRiskassessment/delete', params });

export const confirm = (params?: PmRiskassessment | any) =>
  defHttp.post<PmRiskassessment>({
    url: adminPath + '/proj/safe/pmRiskassessment/confirm',
    params,
  });

export const uploadFile = (params?: PmRiskassessment, data?: PmRiskassessment | any) =>
  defHttp.postJson<PmRiskassessment>({
    url: adminPath + '/proj/safe/pmRiskassessment/uploadFile',
    params,
    data,
  });
